package com.jxstyle.modular.service;

import com.jxstyle.core.base.BaseService;
import com.jxstyle.core.common.page.PageInfo;
import com.jxstyle.modular.entity.Customer;
import com.jxstyle.modular.entity.Sale;
import com.jxstyle.modular.mapper.CustomerMapper;
import com.jxstyle.modular.mapper.SaleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class SaleService extends BaseService<SaleMapper,Sale>{

	@Autowired
	private SaleMapper saleMapper;

	public PageInfo<Sale> page(PageInfo<Sale> page){
		Map<String,Object> map = new HashMap<>();
		map.put("page", page);
		List<Sale> list = saleMapper.findList(map);
		page.setRecords(list);
		return page;
	}
}
